﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects;
using DataObjects.Interfaces;

namespace DataObjects.Entity
{
    class EntityOrderDao : IOrderDao
    {
        public void InsertOrder(Order order)
        {
            using (var context = EntityObjectFactory.CreateContext())
            {
                context.OrderEntities.AddObject(Mapper.Map(order));
                context.SaveChanges();
            }
        }
    }
}
